package day18_Reflection.demo06_Reg;

public class Demo01 {
    public static void main(String[] args) {
        //判断长度在5—10之间
        String s = "ABCDEFGHIJK";
        if (s.length() >= 5 && s.length() <= 10) {
            System.out.println("合理");
        } else {
            System.out.println("不合理");
        }
        //判断是否是QQ邮箱(由5—10个数字以及@qq.com组成)
        String s1 = "1563435@qq.com";
        String[] split = s1.split("@");
        if (split.length == 2) {
            if (split[0].length() >= 5 && split[0].length() <= 10 && split[1].equals("qq.com")) {
                System.out.println("是QQ邮箱");
            } else {
                System.out.println("不是QQ邮箱");}
            }else {
            System.out.println("不是QQ邮箱");
        }
    }
}
